<?php


namespace Part24_IntermediaryModel\Code2;


class ConcreteHandle2 extends Handler
{

    public function handleRequest($request)
    {
        // 该处理者处理10-20的请求
        if ($request >= 10 && $request < 20) {
            echo "ConcreteHandle2处理了请求{$request}\n";
        } elseif ($this->successor != null) {
            // 转移给下一位
            $this->successor->handleRequest($request);
        }
    }
}